﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Entity
{
    public enum menu_type
    {
        AdminWeb = 0,
        WorkApp = 1
    }
    public class rk_menu
    {
        /// <summary>
        ///  菜单ID
        /// </summary>
        public string mid { get; set; }
        /// <summary>
        ///  菜单名称
        /// </summary>
        public string m_name { get; set; }
        /// <summary>
        ///  路由地址
        /// </summary>
        public string route_url { get; set; }
        /// <summary>
        ///  路由图标
        /// </summary>
        public string icon { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime addtime { get; set; }
        /// <summary>
        /// 添加人
        /// </summary>
        public string adduser { get; set; }
        /// <summary>
        /// 上级菜单
        /// </summary>
        public string parent_id { get; set; }
        /// <summary>
        /// 最上级菜单
        /// </summary>
        public string mogami_id { get; set; }
        /// <summary>
        /// 是否页面权限
        /// </summary>
        public bool? ispage { get; set; }
        public string area { get; set; }
        public string controller { get; set; }
        public string action { get; set; }
        public int sort { get; set; }
        /// <summary>
        ///  菜单类型 
        /// </summary>
        public menu_type? menu_type { get; set; }  
    }

    public class rk_menulist : rk_menu
    {
        public string menu_type_str { get { return this.menu_type.ToString(); } }
    }
    public class Vue_GetMyMenuList
    {
        public Vue_GetMyMenuList()
        {
            this.meta = new VueMenuMate();
        }
        public string name { get; set; }

        public string path { get; set; }

        public VueMenuMate meta { get; set; }
        /// <summary>
        /// 是否最下级
        /// </summary>
        public bool IsLast { get; set; }

        public List<Vue_GetMyMenuList> children { get; set; }

    }

    public class VueMenuMate
    {
        public string title { get; set; }
        public string icon { get; set; }
    }
    /// <summary>
    /// 绑定菜单到售货机
    /// </summary>
    public class SaveMenuToRole
    {
        /// <summary>
        /// 角色ID
        /// </summary>
        public string role_id { get; set; }
        public string[] Menu_ids { get; set; }
    }
}
